/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package backupfire;

/**
 *
 * @author user
 */
import javax.swing.JFrame;
import javax.swing.Icon;
import javax.swing.ImageIcon;
import javax.swing.JLabel;
import util.MyFtp;
import javax.swing.JOptionPane;

public class teste extends JFrame{

    public teste()
    {
        Icon image = new ImageIcon("images/loading.gif");
        JLabel lblImg = new JLabel(image); 
        add(lblImg);
        
            /*Ftpeia the files*/
            MyFtp ftp = new MyFtp();
            
            ftp.setUrl("ftp.usinfo.x-br.com");
            ftp.setUser("usinfo");
            ftp.setPassword("159753");
            ftp.setWorkingDirectory("/ftp/");
            
            if( !ftp.connect())
                JOptionPane.showMessageDialog(null,"Problemas ao tentar conectar ao FTP!");
            
            ftp.addFile("C:\\desktop\\teste\\alteracao_entrada.cs");
            ftp.sendFiles();
            ftp.disconnect();    
            
            this.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
    }
    
    public static void main(String []args)
    {
        new teste().setVisible(true);
    }
}
